<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 2.实现一个用户名和密码注册 跳转到另一个页面显示； -->
    <span>账号：</span><input type="text" class="int1" /> <span>密码：</span
    ><input type="password" class="int2" />
    <button>提交</button>
    <script>
      var int1Ele = document.querySelector(".int1");
      var int2Ele = document.querySelector(".int2");
      var btn = document.querySelector("button");
      btn.onclick = function () {
        // var res = "账号：" + int1Ele.value + "密码：" + int2Ele.value;
        window.location.href =
          "h.html?账号=" + int1Ele.value + "&密码=" + int2Ele.value;
      };
    </script>
  </body>
</html>
